Skip to content

add foldl/map Monoid Homomorphisms#1308

Merged
mortberg merged 3 commits into
agda:masterfrom
eiais:listMonoid
May 19, 2026
Merged

add foldl/map Monoid Homomorphisms#1308
mortberg merged 3 commits into
agda:masterfrom
eiais:listMonoid

Conversation

@eiais
Copy link
Copy Markdown
Contributor

@eiais eiais commented May 14, 2026

foldl is a monoid homomorphism from List A to any monoid on A

eiais added 2 commits May 14, 2026 13:22
foldl is a monoid homomorphism from List A to any monoid on A
@eiais eiais changed the title add foldl Monoid Homomorphism add foldl/map Monoid Homomorphisms May 15, 2026
Copy link
Copy Markdown
Collaborator

@mortberg mortberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot. I have a few small comments before this can be merged

MonoidStr.isMonoid (snd (ListMonoid (_ , pf))) = makeIsMonoid (isOfHLevelList 0 pf)
(λ x y z → sym (++-assoc x y z)) ++-unit-r (λ _ → refl)

foldlMonHom : (M : Monoid ℓ-zero) → MonoidHom (ListMonoid (fst M , MonoidStr.is-set (snd M))) M
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this only for level zero? Can't it be universe polymorphic?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why decompose M? Shouldn't ListMonoid M work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it universe polymorphic :). I dont think ListMonoid M works because I only need fact that it's a set from the structure.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, of course!

Comment thread Cubical/Algebra/Monoid/Instances/List.agda Outdated
@mortberg mortberg merged commit 8a45d73 into agda:master May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants